/**
 * @author Ashley
 * 
 * Class that is the parent class of all of our
 * operators to make our checking more generic.
 * Not to be called by itself.
 */
abstract class Operator 
{
	private String op;
	
	public Operator(String newOp) {
		op = newOp;
	}
	
	public String getOpName() {
		return op;
	}
	
	/* To be overridden by sub-classes */
	public STO checkOperands(STO left, STO right) { 
		return null; 
	}
	public STO unaryOperand(STO op) { 
		return null; 
	}
	
	/* Added in Check 8: Constant Folding */
	public STO calculate(ConstSTO left, ConstSTO right) {
		return null;
	}
	public STO calculate(ConstSTO op) {
		return null;
	}
	
	/* Arithmetic Operators: + - (*) (/) % */
	public boolean isArithmeticOp() { return false; }
	public boolean isAddOp() { return false; }
	public boolean isMinusOp() { return false; }
	public boolean isMulOp() { return false; }
	public boolean isDivOp() { return false; }
	public boolean isModOp() { return false; }
	
	/* Comparison Operators: > >= < <= == != */
	public boolean isComparisonOp() { return false; }
	public boolean isEqualToOp() { return false; }
	public boolean isNotEqualToOp() { return false; } 
	public boolean isLessThanOp() { return false; }
	public boolean isGreaterThanOp() { return false; }
	public boolean isLessThanOrEqualToOp() { return false; }
	public boolean isGreaterThanOrEqualToOp() { return false; }
	
	/* Boolean Operators: && || */
	public boolean isBooleanOp() { return false; }
	public boolean isOrOp() { return false; }
	public boolean isAndOp() { return false; }

	/* Bitwise Operators: & ^ | */
	public boolean isBitwiseOp() { return false; }
	public boolean isAmpersandOp() { return false; }
	public boolean isCaretOp() { return false; }
	public boolean isBarOp() { return false; }
	
	/* Unary Operators: ! ++ -- */
	public boolean isUnaryOp() { return false; }
	public boolean isNotOp() { return false; }
	public boolean isIncOp() { return false; }
	public boolean isDecOp() { return false; }

	
	public boolean	isPointerType()	{ 
		return false; 
	} // PtrType
	public boolean	isFuncPtrTyp() { 
		return false; 
	} // FuncPtrType
}
